<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RDoc::TopLevel - rdoc: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="Context.html">RDoc::Context</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li class="calls-super" ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-3D-3D">#==</a>
    <li ><a href="#method-i-add_alias">#add_alias</a>
    <li ><a href="#method-i-add_constant">#add_constant</a>
    <li ><a href="#method-i-add_include">#add_include</a>
    <li ><a href="#method-i-add_method">#add_method</a>
    <li ><a href="#method-i-add_to_classes_or_modules">#add_to_classes_or_modules</a>
    <li ><a href="#method-i-base_name">#base_name</a>
    <li ><a href="#method-i-cvs_url">#cvs_url</a>
    <li class="calls-super" ><a href="#method-i-display-3F">#display?</a>
    <li ><a href="#method-i-eql-3F">#eql?</a>
    <li ><a href="#method-i-find_class_or_module">#find_class_or_module</a>
    <li class="calls-super" ><a href="#method-i-find_local_symbol">#find_local_symbol</a>
    <li ><a href="#method-i-find_module_named">#find_module_named</a>
    <li ><a href="#method-i-full_name">#full_name</a>
    <li ><a href="#method-i-hash">#hash</a>
    <li ><a href="#method-i-http_url">#http_url</a>
    <li ><a href="#method-i-last_modified">#last_modified</a>
    <li ><a href="#method-i-marshal_dump">#marshal_dump</a>
    <li ><a href="#method-i-object_class">#object_class</a>
    <li ><a href="#method-i-page_name">#page_name</a>
    <li ><a href="#method-i-parser-3D">#parser=</a>
    <li ><a href="#method-i-path">#path</a>
    <li ><a href="#method-i-search_record">#search_record</a>
    <li ><a href="#method-i-text-3F">#text?</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RDoc::TopLevel">
    <h1 id="class-RDoc::TopLevel" class="class">
      class RDoc::TopLevel
    </h1>

    <section class="description">
    
<p>A <a href="TopLevel.html"><code>TopLevel</code></a> context is a representation of the contents of a single file</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-absolute_name" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">absolute_name</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>Absolute name of this file</p>
              </div>
            </div>
          <div id="attribute-i-classes_or_modules" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">classes_or_modules</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>All the classes or modules that were declared in this file. These are assigned to either <code>#classes_hash</code> or <code>#modules_hash</code> once we know what they really are.</p>
              </div>
            </div>
          <div id="attribute-i-file_stat" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">file_stat</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>This TopLevel’s File::Stat struct</p>
              </div>
            </div>
          <div id="attribute-i-parser" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">parser</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              <p>The parser class that processed this file</p>
              </div>
            </div>
          <div id="attribute-i-relative_name" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">relative_name</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              <p>Relative name of this file</p>
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(absolute_name, relative_name = absolute_name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Creates a new <a href="TopLevel.html"><code>TopLevel</code></a> for the file at <code>absolute_name</code>.  If documentation is being generated outside the source dir <code>relative_name</code> is relative to the source directory.</p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="Context.html#method-c-new"><code>RDoc::Context::new</code></a>
                              </div>

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 43</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-identifier">absolute_name</span>, <span class="ruby-identifier">relative_name</span> = <span class="ruby-identifier">absolute_name</span>
  <span class="ruby-keyword">super</span>()
  <span class="ruby-ivar">@name</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@absolute_name</span> = <span class="ruby-identifier">absolute_name</span>
  <span class="ruby-ivar">@relative_name</span> = <span class="ruby-identifier">relative_name</span>
  <span class="ruby-ivar">@file_stat</span>     = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">absolute_name</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-keyword">nil</span> <span class="ruby-comment"># HACK for testing</span>
  <span class="ruby-ivar">@diagram</span>       = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@parser</span>        = <span class="ruby-keyword">nil</span>

  <span class="ruby-ivar">@classes_or_modules</span> = []
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-3D-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">==</span><span
                                class="method-args">(other)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>An <a href="TopLevel.html"><code>RDoc::TopLevel</code></a> is equal to another with the same <a href="TopLevel.html#attribute-i-relative_name"><code>relative_name</code></a></p>

                              <div class="method-source-code" id="3D-3D-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 64</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">==</span> <span class="ruby-identifier">other</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">other</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@relative_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">relative_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="TopLevel.html#method-i-eql-3F">eql?</a>
                            </div>

                          </div>

                  <div id="method-i-add_alias" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_alias</span><span
                                class="method-args">(an_alias)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>an_alias</code> to <code>Object</code> instead of <code>self</code>.</p>

                              <div class="method-source-code" id="add_alias-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_alias</span>(<span class="ruby-identifier">an_alias</span>)
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">an_alias</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@document_self</span>
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">add_alias</span> <span class="ruby-identifier">an_alias</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-add_constant" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_constant</span><span
                                class="method-args">(constant)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>constant</code> to <code>Object</code> instead of <code>self</code>.</p>

                              <div class="method-source-code" id="add_constant-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 82</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_constant</span> <span class="ruby-identifier">constant</span>
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">constant</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@document_self</span>
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">add_constant</span> <span class="ruby-identifier">constant</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-add_include" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_include</span><span
                                class="method-args">(include)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>include</code> to <code>Object</code> instead of <code>self</code>.</p>

                              <div class="method-source-code" id="add_include-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 91</span>
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_include</span>(<span class="ruby-identifier">include</span>)
    <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">include</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@document_self</span>
    <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">add_include</span> <span class="ruby-identifier">include</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Adds +method+ to +Object+ instead of +self+.</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_method</span>(<span class="ruby-identifier">method</span>)
    <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">method</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@document_self</span>
    <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">add_method</span> <span class="ruby-identifier">method</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Adds class or module +mod+. Used in the building phase</span>
  <span class="ruby-comment"># by the Ruby parser.</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_to_classes_or_modules</span> <span class="ruby-identifier">mod</span>
    <span class="ruby-ivar">@classes_or_modules</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">mod</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Base name of this file</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">base_name</span>
    <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-ivar">@relative_name</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">alias</span> <span class="ruby-identifier">name</span> <span class="ruby-identifier">base_name</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Only a TopLevel that contains text file) will be displayed.  See also</span>
  <span class="ruby-comment"># RDoc::CodeObject#display?</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">display?</span>
    <span class="ruby-identifier">text?</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">super</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># See RDoc::TopLevel::find_class_or_module</span>
  <span class="ruby-comment">#--</span>
  <span class="ruby-comment"># TODO Why do we search through all classes/modules found, not just the</span>
  <span class="ruby-comment">#       ones of this instance?</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_class_or_module</span> <span class="ruby-identifier">name</span>
    <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">find_class_or_module</span> <span class="ruby-identifier">name</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Finds a class or module named +symbol+</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_local_symbol</span>(<span class="ruby-identifier">symbol</span>)
    <span class="ruby-identifier">find_class_or_module</span>(<span class="ruby-identifier">symbol</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword">super</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Finds a module or class with +name+</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_module_named</span>(<span class="ruby-identifier">name</span>)
    <span class="ruby-identifier">find_class_or_module</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Returns the relative name of this file</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_name</span>
    <span class="ruby-ivar">@relative_name</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># An RDoc::TopLevel has the same hash as another with the same</span>
  <span class="ruby-comment"># relative_name</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash</span>
    <span class="ruby-ivar">@relative_name</span>.<span class="ruby-identifier">hash</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># URL for this with a +prefix+</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">http_url</span>(<span class="ruby-identifier">prefix</span>)
    <span class="ruby-identifier">path</span> = [<span class="ruby-identifier">prefix</span>, <span class="ruby-ivar">@relative_name</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">&#39;.&#39;</span>, <span class="ruby-string">&#39;_&#39;</span>)]

    <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">path</span>.<span class="ruby-identifier">compact</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&#39;.html&#39;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inspect</span> <span class="ruby-comment"># :nodoc:</span>
    <span class="ruby-string">&quot;#&lt;%s:0x%x %p modules: %p classes: %p&gt;&quot;</span> <span class="ruby-operator">%</span> [
      <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>, <span class="ruby-identifier">object_id</span>,
      <span class="ruby-identifier">base_name</span>,
      <span class="ruby-ivar">@modules</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span> },
      <span class="ruby-ivar">@classes</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> }
    ]
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Time this file was last modified, if known</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">last_modified</span>
    <span class="ruby-ivar">@file_stat</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">file_stat</span>.<span class="ruby-identifier">mtime</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Dumps this TopLevel for use by ri.  See also #marshal_load</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">marshal_dump</span>
    [
      <span class="ruby-constant">MARSHAL_VERSION</span>,
      <span class="ruby-ivar">@relative_name</span>,
      <span class="ruby-ivar">@parser</span>,
      <span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@comment</span>),
    ]
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Loads this TopLevel from +array+.</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">marshal_load</span> <span class="ruby-identifier">array</span> <span class="ruby-comment"># :nodoc:</span>
    <span class="ruby-identifier">initialize</span> <span class="ruby-identifier">array</span>[<span class="ruby-value">1</span>]

    <span class="ruby-ivar">@parser</span>  = <span class="ruby-identifier">array</span>[<span class="ruby-value">2</span>]
    <span class="ruby-ivar">@comment</span> = <span class="ruby-identifier">array</span>[<span class="ruby-value">3</span>]

    <span class="ruby-ivar">@file_stat</span>          = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Returns the NormalClass &quot;Object&quot;, creating it if not found.</span>
  <span class="ruby-comment">#</span>
  <span class="ruby-comment"># Records +self+ as a location in &quot;Object&quot;.</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_class</span>
    <span class="ruby-ivar">@object_class</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">oc</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">find_class_named</span>(<span class="ruby-string">&#39;Object&#39;</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">add_class</span>(<span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">NormalClass</span>, <span class="ruby-string">&#39;Object&#39;</span>)
      <span class="ruby-identifier">oc</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
      <span class="ruby-identifier">oc</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Base name of this file without the extension</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">page_name</span>
    <span class="ruby-identifier">basename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-ivar">@relative_name</span>
    <span class="ruby-identifier">basename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\.(rb|rdoc|txt|md)$/i</span>

    <span class="ruby-node">$`</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">basename</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Path to this file for use with HTML generator output.</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">path</span>
    <span class="ruby-identifier">http_url</span> <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">rdoc</span>.<span class="ruby-identifier">generator</span>.<span class="ruby-identifier">file_dir</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pretty_print</span> <span class="ruby-identifier">q</span> <span class="ruby-comment"># :nodoc:</span>
    <span class="ruby-identifier">q</span>.<span class="ruby-identifier">group</span> <span class="ruby-value">2</span>, <span class="ruby-node">&quot;[#{self.class}: &quot;</span>, <span class="ruby-string">&quot;]&quot;</span> <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">q</span>.<span class="ruby-identifier">text</span> <span class="ruby-node">&quot;base name: #{base_name.inspect}&quot;</span>
      <span class="ruby-identifier">q</span>.<span class="ruby-identifier">breakable</span>

      <span class="ruby-identifier">items</span> = <span class="ruby-ivar">@modules</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span> }
      <span class="ruby-identifier">items</span>.<span class="ruby-identifier">concat</span> <span class="ruby-ivar">@modules</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span>,<span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> }
      <span class="ruby-identifier">q</span>.<span class="ruby-identifier">seplist</span> <span class="ruby-identifier">items</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span> <span class="ruby-identifier">q</span>.<span class="ruby-identifier">pp</span> <span class="ruby-identifier">mod</span> <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Search record used by RDoc::Generator::JsonIndex</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search_record</span>
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@parser</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Text</span>

    [
      <span class="ruby-identifier">page_name</span>,
      <span class="ruby-string">&#39;&#39;</span>,
      <span class="ruby-identifier">page_name</span>,
      <span class="ruby-string">&#39;&#39;</span>,
      <span class="ruby-identifier">path</span>,
      <span class="ruby-string">&#39;&#39;</span>,
      <span class="ruby-identifier">snippet</span>(<span class="ruby-ivar">@comment</span>),
    ]
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment">##</span>
  <span class="ruby-comment"># Is this TopLevel from a text file instead of a source code file?</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">text?</span>
    <span class="ruby-ivar">@parser</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Text</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span> <span class="ruby-comment"># :nodoc:</span>
    <span class="ruby-node">&quot;file #{full_name}&quot;</span>
  <span class="ruby-keyword">end</span>

<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-add_method" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_method</span><span
                                class="method-args">(method)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds <code>method</code> to <code>Object</code> instead of <code>self</code>.</p>

                              <div class="method-source-code" id="add_method-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 100</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_method</span>(<span class="ruby-identifier">method</span>)
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">method</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@document_self</span>
  <span class="ruby-identifier">object_class</span>.<span class="ruby-identifier">add_method</span> <span class="ruby-identifier">method</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-add_to_classes_or_modules" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_to_classes_or_modules</span><span
                                class="method-args">(mod)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds class or module <code>mod</code>. Used in the building phase by the Ruby parser.</p>

                              <div class="method-source-code" id="add_to_classes_or_modules-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 110</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_to_classes_or_modules</span> <span class="ruby-identifier">mod</span>
  <span class="ruby-ivar">@classes_or_modules</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">mod</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-base_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">base_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Base name of this file</p>

                              <div class="method-source-code" id="base_name-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 117</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">base_name</span>
  <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-ivar">@relative_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cvs_url" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cvs_url</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns a URL for this source file on some web repository.  Use the -W command line option to set.</p>

                              <div class="method-source-code" id="cvs_url-source">
            <pre><span class="ruby-comment"># File rdoc/generator/markup.rb, line 149</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cvs_url</span>
  <span class="ruby-identifier">url</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">rdoc</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">webcvs</span>

  <span class="ruby-keyword">if</span> <span class="ruby-regexp">/%s/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">url</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">url</span> <span class="ruby-operator">%</span> <span class="ruby-ivar">@relative_name</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@relative_name</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-display-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">display?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Only a <a href="TopLevel.html"><code>TopLevel</code></a> that contains text file) will be displayed.  See also <a href="CodeObject.html#method-i-display-3F"><code>RDoc::CodeObject#display?</code></a></p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="CodeObject.html#method-i-display-3F"><code>RDoc::CodeObject#display?</code></a>
                              </div>

                              <div class="method-source-code" id="display-3F-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 127</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">display?</span>
  <span class="ruby-identifier">text?</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">super</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-eql-3F" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">eql?</span><span
                                class="method-args">(other)</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="TopLevel.html#method-i-3D-3D">==</a>
                            </div>
                          </div>

                  <div id="method-i-find_class_or_module" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">find_class_or_module</span><span
                                class="method-args">(name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>See RDoc::TopLevel::find_class_or_module</p>

                              <div class="method-source-code" id="find_class_or_module-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 137</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_class_or_module</span> <span class="ruby-identifier">name</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">find_class_or_module</span> <span class="ruby-identifier">name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-find_local_symbol" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">find_local_symbol</span><span
                                class="method-args">(symbol)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Finds a class or module named <code>symbol</code></p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="Context.html#method-i-find_local_symbol"><code>RDoc::Context#find_local_symbol</code></a>
                              </div>

                              <div class="method-source-code" id="find_local_symbol-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 144</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_local_symbol</span>(<span class="ruby-identifier">symbol</span>)
  <span class="ruby-identifier">find_class_or_module</span>(<span class="ruby-identifier">symbol</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword">super</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-find_module_named" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">find_module_named</span><span
                                class="method-args">(name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Finds a module or class with <code>name</code></p>

                              <div class="method-source-code" id="find_module_named-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 151</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">find_module_named</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-identifier">find_class_or_module</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-full_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">full_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the relative name of this file</p>

                              <div class="method-source-code" id="full_name-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 158</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">full_name</span>
  <span class="ruby-ivar">@relative_name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-hash" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">hash</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>An <a href="TopLevel.html"><code>RDoc::TopLevel</code></a> has the same hash as another with the same <a href="TopLevel.html#attribute-i-relative_name"><code>relative_name</code></a></p>

                              <div class="method-source-code" id="hash-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 166</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">hash</span>
  <span class="ruby-ivar">@relative_name</span>.<span class="ruby-identifier">hash</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-http_url" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">http_url</span><span
                                class="method-args">(prefix)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>URL for this with a <code>prefix</code></p>

                              <div class="method-source-code" id="http_url-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 173</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">http_url</span>(<span class="ruby-identifier">prefix</span>)
  <span class="ruby-identifier">path</span> = [<span class="ruby-identifier">prefix</span>, <span class="ruby-ivar">@relative_name</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">&#39;.&#39;</span>, <span class="ruby-string">&#39;_&#39;</span>)]

  <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">path</span>.<span class="ruby-identifier">compact</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&#39;.html&#39;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-last_modified" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">last_modified</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Time this file was last modified, if known</p>

                              <div class="method-source-code" id="last_modified-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 191</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">last_modified</span>
  <span class="ruby-ivar">@file_stat</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">file_stat</span>.<span class="ruby-identifier">mtime</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-marshal_dump" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">marshal_dump</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Dumps this <a href="TopLevel.html"><code>TopLevel</code></a> for use by ri.  See also marshal_load</p>

                              <div class="method-source-code" id="marshal_dump-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 198</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">marshal_dump</span>
  [
    <span class="ruby-constant">MARSHAL_VERSION</span>,
    <span class="ruby-ivar">@relative_name</span>,
    <span class="ruby-ivar">@parser</span>,
    <span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@comment</span>),
  ]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-object_class" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">object_class</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the NormalClass “Object”, creating it if not found.</p>

<p>Records <code>self</code> as a location in “Object”.</p>

                              <div class="method-source-code" id="object_class-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 224</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">object_class</span>
  <span class="ruby-ivar">@object_class</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">oc</span> = <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">find_class_named</span>(<span class="ruby-string">&#39;Object&#39;</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">add_class</span>(<span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">NormalClass</span>, <span class="ruby-string">&#39;Object&#39;</span>)
    <span class="ruby-identifier">oc</span>.<span class="ruby-identifier">record_location</span> <span class="ruby-keyword">self</span>
    <span class="ruby-identifier">oc</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-page_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">page_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Base name of this file without the extension</p>

                              <div class="method-source-code" id="page_name-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 235</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">page_name</span>
  <span class="ruby-identifier">basename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span> <span class="ruby-ivar">@relative_name</span>
  <span class="ruby-identifier">basename</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/\.(rb|rdoc|txt|md)$/i</span>

  <span class="ruby-node">$`</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">basename</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parser-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parser=</span><span
                                class="method-args">(val)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parser-3D-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 55</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parser=</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-ivar">@parser</span> = <span class="ruby-identifier">val</span>
  <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">update_parser_of_file</span>(<span class="ruby-identifier">absolute_name</span>, <span class="ruby-identifier">val</span>) <span class="ruby-keyword">if</span> <span class="ruby-ivar">@store</span>
  <span class="ruby-ivar">@parser</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-path" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">path</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Path to this file for use with HTML generator output.</p>

                              <div class="method-source-code" id="path-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 245</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">path</span>
  <span class="ruby-identifier">http_url</span> <span class="ruby-ivar">@store</span>.<span class="ruby-identifier">rdoc</span>.<span class="ruby-identifier">generator</span>.<span class="ruby-identifier">file_dir</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-search_record" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">search_record</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Search record used by <a href="Generator/JsonIndex.html"><code>RDoc::Generator::JsonIndex</code></a></p>

                              <div class="method-source-code" id="search_record-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 263</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search_record</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@parser</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Text</span>

  [
    <span class="ruby-identifier">page_name</span>,
    <span class="ruby-string">&#39;&#39;</span>,
    <span class="ruby-identifier">page_name</span>,
    <span class="ruby-string">&#39;&#39;</span>,
    <span class="ruby-identifier">path</span>,
    <span class="ruby-string">&#39;&#39;</span>,
    <span class="ruby-identifier">snippet</span>(<span class="ruby-ivar">@comment</span>),
  ]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-text-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">text?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Is this <a href="TopLevel.html"><code>TopLevel</code></a> from a text file instead of a source code file?</p>

                              <div class="method-source-code" id="text-3F-source">
            <pre><span class="ruby-comment"># File rdoc/top_level.rb, line 280</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">text?</span>
  <span class="ruby-ivar">@parser</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">RDoc</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Text</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

